{include file="public/header" title="人员管理" /}
<div class="main">
    <div class="div mar1">

        <div class="right_box fl">
        	<div class="checkDiv">
                <div class="fr">
                	<form action="{:url('index/userlist/index')}" method="post">
	                	<input type="text" name="txtsearch" class="text textHe2" value="{$txtsearch}"/>
	                	<input type="submit" value="查 询" class="btn infoBtn mar3" />
                	</form>
                </div>
            </div>
            <!--startprint-->
        	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table mar2">
                <tr>
                	<th><input type="checkbox" /></th>
                    <th>编号</th>
                    <th>openid</th>
                    <th>昵称</th>
                    <th>头像</th>
                    <th>组id</th>
                    <th>小组名</th>
                    <th>注册日期</th>
                    <th>操作</th>
                </tr>
            {foreach $list as $key=>$vo } 
                <tr>
                    <td><input type="hidden" /></td>
                    <td>{$vo.user_id}</td>
                    <td>{$vo.openid}</td>
                    <td>{$vo.nick_name}</td>
                    <td><img class="imgheader" src="{$vo.avatar_url}"  alt="{$vo.nick_name}" /></td>
                    <td>{$vo.group_id}</td>
                    <td>{$vo.group_name}</td>
                    <td>{$vo.registe_date}</td>
                    <td><span>
                    <a href="javascript:void(0);" title="修改" class="edit" onclick="editClick({$vo.user_id});">&nbsp;</a>
                    <a href="javascript:void(0);" title="删除" class="del" onclick="deleteClick({$vo.user_id});">&nbsp;</a>
                    </span></td>
                </tr>
            {/foreach}
            </table>
            {:$list->render()}
            <!--弹出层时背景层DIV-->
            <div id="fade" class="black_overlay">
            </div>
            <div id="MyDelDiv" class="white_content">
                <div class="out_title"><p class="fl">提示</p><a href="#" class="close fr" onclick="CloseDiv('MyDelDiv','fade')" title="关闭">&nbsp;</a></div>
                <div class="out_content">
                    <h3><img src="" class="out_inpor" /><p class="prompt">确定要删除此项？</p></h3>
                </div>
                <form action='userlist/delete' method='post'>
                    <input type="text" id="input_del_desc" name="ask" class="form-control" style="display: none" placeholder="题目" value='' readonly>
                    <input type="text" id="input_del_id" name="question_id" class="form-control" style="display: none" placeholder="题目id" value='' readonly>
                    <div class="out_info">
                        <div class="fr"><input type="submit" value="确&nbsp;定" class="btn infoBtn" /><input type="button" value="取&nbsp;消" class="btn defultBtn mar3" onclick="CloseDiv('MyDelDiv','fade')" /></div>
                    </div>
                </form>
            </div>
            <div id="MyDiv" class="white_content">
            	<div class="out_title"><p class="fl">提示</p><a href="#" class="close fr" onclick="CloseDiv('MyDiv','fade')" title="关闭">&nbsp;</a></div>
                <div class="out_content">
                	<h3><img src="" class="out_inpor" /><p class="prompt">确定要删除此项？</p></h3>
                </div>
                <div class="out_info">
                	<div class="fr"><input type="button" value="确&nbsp;定" class="btn infoBtn" /><input type="button" value="取&nbsp;消" class="btn defultBtn mar3" /></div>
                </div>
            </div>
            
			<div class="paginateX"></div>
            <!--endprint-->
        </div>
    </div>
</div>

{include file="public/footer" menu_sel="menu_sel2" /}
</body>
<script type="text/javascript">
    $(document).ready(function(){
        rowClicked=function(ask, question_id){
            console.log('rowClicked');
            $("#input_del_desc").val(ask);
            $("#input_del_id").val(question_id);
        }
    })
    
    function editClick(user_id){
    	var str = "?user_id="+user_id;
    	window.location.href = "{:url('index/userlist/edit')}"+str;
    }
    function deleteClick(user_id){
    	if (confirm("确认删除吗？删除无法恢复！！！")){
	    	var str = "?user_id="+user_id;
	    	window.location.href = "{:url('index/userlist/delete')}"+str;
    	}
    }   
</script>
</html>
